import React, {useState, useEffect} from 'react';
import {TabController, View, Colors, Text} from 'react-native-ui-lib';
import {useSelector} from 'react-redux';
import SubmitReport from './submitReport';

const conf = {
  0: {
    key: 'undo',
    text: '日报填写',
  },
  1: {
    key: 'doing',
    text: '日报审批',
  },
};

function Report({navigation, route}) {
  // const Prefix = global.file;
  const appTheme = useSelector(state => state.appTheme);
  const [rerender, setRerender] = useState(true);

  useEffect(() => {
    setRerender(false);
    setTimeout(() => {
      setRerender(true);
    }, 10);
  }, [appTheme]);

  return (
    <View
      flex-1
      style={{
        backgroundColor: Colors.backgroundColor,
      }}>
      <View flex-1>
        <SubmitReport route={route} />
      </View>
    </View>
  );
}

export default Report;
